﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EggGame
{
    public class MachineEgg : Egg
    {
        public string Name { get; set; }

        public override void Display()
        {
            Console.WriteLine($"{Name}：我来罗！");
        }

        public MachineEgg()
        {
            Name = "机械蛋仔";

            // 行为实现的初始化
            swimBehavior = new CanNotSwim();
            flyBehavior = new FlyWithEngine();
            soundBehavior = new NormalSound();
            rollBehavior = new RollWithEngine();
            // …… 其它的行为实例略
        }
    }
}
